<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/util_file/common.jspf"%>
<style>
#admin_product {
	font: 12px/1.2 "돋움", dotum, bold;
}

th {
	background-color: #f1f1f1
}
</style><script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="/jeons/js/jquery.nyroModal.custom.js"></script>
<link rel="stylesheet" href="/jeons/css/nyroModal/nyroModal.css" type="text/css" media="screen" />
<script src="/jeons/js/jquery.metadata.js" type="text/javascript"></script>
<script src="/jeons/js/jquery.validate.js" type="text/javascript"></script>
<script src="/jeons/js/jquery.metadata.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready( function(){
	
	$(".nm").nm({
		sizes:{
			minW : 400,
			maxW : 500,
			minH : 400,
			maxH : 400
		},stack:true
	}); 
	
	 $(".list_pro").each(function(i) { 
		 var max_size = 100; 
		  if ($(this).height() > $(this).width()) { 
		  var h = max_size; 
		  var w = Math.ceil($(this).width() / $(this).height() * max_size); 
		  } else {
		  var w = max_size; 
		  var h = Math.ceil($(this).height() / $(this).width() * max_size); 
		  } 
		   $(this).css({ height: h, width: w }); 
		  }); 
	
	function goPage(page){
		location.href="/jeons/admin/product/cpu?page="+page;
	}	
	
});
</script>
<div id="admin_product">
	<table border="0" width="675px" height="50">
		<tr>
			<td colspan="6" bgcolor="#000000" height="1"></td>
		</tr>
		<tr align="center">
			<th height="24">번호</th>
			<th>이미지</th>
			<th height="24">제품명</th>
			<th height="24">가격</th>
			<th height="24">수량</th>
			<th height="24">제조회사</th>
		</tr>
		<tr>
			<td colspan="6" bgcolor="#000000" height="1"></td>
		</tr>
		<c:forEach items="${data}" var="item" varStatus="status">
			<tr align="center">
				<td>${count - (item.page-1)*10 - status.index}</td>
				<td><img class="list_pro" src="/jeons/upload/product/${item.l_filename}"/></td> 
				<%-- <c:if test="${item.delivery == null && item.del_status == 'sun'}"> --%>
				<c:if test="${item.type == 'soundnlan'}">
				<td><a href="/jeons/info_product/snl_info?prono=${item.prono}&product=${item.product}" class="nm">${item.product}</a></td>
				</c:if>
				<c:if test="${item.type != 'soundnlan'}">
				<td><a href="/jeons/info_product/${item.type}_info?prono=${item.prono}&product=${item.product}" class="nm">${item.product}</a></td>
				</c:if>
				<td><fmt:formatNumber value="${item.price}" pattern=",###" /></td>
				<td>${item.p_number}</td>
				<td>${item.manufacturer}</td>
			</tr>
			<tr>
			<td colspan="6" bgcolor="#000000" height="1"></td>
		</tr>
		</c:forEach>
	</table>
	<br>
	<div align="center">
	${page}
	</div>
	<div align="right">
		<a href="/jeons/admin/product/${param.type}_insert?menu_name=${param.menu_name}">등록</a>
	</div>
	
</div>